From 8713397948ec079135ed14ebc434053771d24726 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 19 May 2019 20:35:59 +0000 Subject: [PATCH] root: Make gtk_root_get_display public This is following the precedent of making GtkNative getters public. --- gtk/gtkroot.c | 8 ++++++++ gtk/gtkroot.h | 3 +++ gtk/gtkrootprivate.h | 2 -- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/gtk/gtkroot.c b/gtk/gtkroot.c index 95e8f69f26..919aa65f94 100644 --- a/gtk/gtkroot.c +++ b/gtk/gtkroot.c @@ -63,6 +63,14 @@ gtk_root_default_init (GtkRootInterface *iface) GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY)); } +/** + * gtk_root_get_display: + * @self: a #GtkRoot + * + * Returns the display that this GtkRoot is on. + * + * Returns: (transfer none): the display of @root + */ GdkDisplay * gtk_root_get_display (GtkRoot *self) { diff --git a/gtk/gtkroot.h b/gtk/gtkroot.h index 3136a00911..648defa380 100644 --- a/gtk/gtkroot.h +++ b/gtk/gtkroot.h @@ -48,6 +48,9 @@ struct _GtkRootInterface GdkDisplay * (* get_display) (GtkRoot *self); }; +GDK_AVAILABLE_IN_ALL +GdkDisplay * gtk_root_get_display (GtkRoot *root); + GDK_AVAILABLE_IN_ALL void gtk_root_set_focus (GtkRoot *self, GtkWidget *focus); diff --git a/gtk/gtkrootprivate.h b/gtk/gtkrootprivate.h index ddf4fb01ef..3afbae712c 100644 --- a/gtk/gtkrootprivate.h +++ b/gtk/gtkrootprivate.h @@ -5,8 +5,6 @@ G_BEGIN_DECLS -GdkDisplay * gtk_root_get_display (GtkRoot *root); - enum { GTK_ROOT_PROP_FOCUS_WIDGET, GTK_ROOT_NUM_PROPERTIES -- 2.30.2